import request from '../index';
import type { IQueryData } from './types';
import type { IDataType } from '../types';
export function getTableData(url: string, data?: IQueryData) {
  return request.post<IDataType>({
    url,
    data
  });
}

export function deleteTableData(url: string) {
  return request.delete<IDataType>({
    url
  });
}

export function createTableData(url: string, data: any) {
  return request.post<IDataType>({
    url,
    data
  });
}

export function editTableData(url: string, data: any) {
  return request.patch<IDataType>({
    url,
    data
  });
}
